<?php
namespace app\common\model;
use think\model\concern\SoftDelete;

class FinancialRecord extends Base
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';

    public static function adds($user_id = 0, $obj_id = 0, $obj_type = 1, $money_type = 1, $content = '', $num = 0)
    {
        return self::create([
            'user_id'    => $user_id,
            'obj_id'     => $obj_id,
            'obj_type'   => $obj_type,
            'money_type' => $money_type,
            'content'    => $content,
            'num'        => $num,
        ]) === false ? false : true;
    }
}